version 8.2
capture clear
capture log close
set more off
set mem 510m
set mat 800

use "data_mcgill_final.dta"
	
label variable mean_class_quiz "Leave-me-out Mean Class Score"

*****drop the emails!!
drop if email_dummy_group==1


reg fshortdum1 mean_group_quiz mean_class_quiz teamwork Fall201* , robust cluster(term_group_T_P)
outreg2 using "Table2.xls", label bdec(2) se sdec(2) replace

global list_var	fshortdum2 fshortdum3 fshortdum4 fshortdum5 female origin3_dum1 origin3_dum2 origin3_dum3 origin3_dum4 origin3_dum5 class_clean_dum1 class_clean_dum2 class_clean_dum3 class_clean_dum4 quiz_bef french_name english_name smile

foreach var of global list_var{
	reg `var' mean_group_quiz mean_class_quiz teamwork Fall201* , robust cluster(term_group_T_P)
	outreg2 using "Table2.xls",  bdec(2) ctitle("`var'") label se sdec(2) append
	}
exit
 
